package com.zhihesj.anan.base.service;

import com.zhihesj.anan.base.mapper.BaseMapper;
import com.zhihesj.anan.base.service.BaseService;

import java.util.List;
import java.util.Map;

/**
 * @author anan.
 * @version 1.0
 * @create 2020-05-30 17-14
 */
public abstract class BaseServiceImpl<T> implements BaseService<T> {

    protected BaseMapper<T> baseMapper;

    @Override
    public void save(T entity) {
        baseMapper.insert(entity);
    }

    @Override
    public void update(T entity) {
        baseMapper.updateById(entity);
    }

    @Override
    public void delete(T entity) {
        baseMapper.delete(entity);
    }

    @Override
    public void delete(String id) {
        baseMapper.deleteById(id);
    }

    @Override
    public T findById(String id) {
        return null;
    }

    @Override
    public T find(String fieldName, Object fieldValue) {
        return null;
    }

    @Override
    public List<T> findList(String fieldName, Object fieldValue) {
        return null;
    }

    @Override
    public List<T> findAll() {
        return null;
    }

    @Override
    public List<T> findListByIds(List<String> idList) {
        return null;
    }

    @Override
    public <X> X find(String hql, Object... values) {
        return null;
    }

    @Override
    public <X> X find(String hql, Map<String, ?> values) {
        return null;
    }

    @Override
    public <X> List<X> findList(String hql, Object... values) {
        return null;
    }

    @Override
    public <X> List<X> findList(String hql, Map<String, ?> values) {
        return null;
    }

    @Override
    public int batchExecute(String hql, Object... values) {
        return 0;
    }

    @Override
    public int batchExecute(String hql, Map<String, ?> values) {
        return 0;
    }

    @Override
    public List find(String sql) {
        return null;
    }
}
